<%--
  Created by IntelliJ IDEA.
  User: wohlgemuth
  Date: Feb 10, 2010
  Time: 8:49:40 PM
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head><title>Result</title></head>

<style type="text/css">@import url("/compound-repository/css/WebGUIStandards.css");</style>

<body topMargin=0 background="/compound-repository/images/FormBG.gif" >
<br>
<table  border='0' width="100%" align='center' cellpadding="0" cellspacing="0">
	<tr>
		<td colspan="9" class="AppsLabel" align="center"> Result </td>
	</tr>

    <tr>
		<td colspan="9" align='right'>
                  [ <g:link controller="transform" action="index">Back to transform</g:link> ]
				  [ <g:link controller="homePage" action="index">Back to home</g:link> ]
	    </td>
	</tr>

  <tr height='2'> <td> &nbsp; </td> </tr>
</table>



<table border="0" id="tblSample" width="100%" align='center' cellpadding="3" cellspacing="0"class="TableBG" >

  <tr>
    <td colspan="9">
      <table class="TableBG" width="100%">
      <tr>
          <td width="1%"> &nbsp; </td>
          <td width="5%"> Id : </td>
          <td width="30%" class="Label3">${id}</td>
          <td width="1%"> &nbsp; </td>
          <td width="5%">From : </td>
          <td width="15%" class="Label3">${from}</td>
          <td width="1%"> &nbsp; </td>
          <td width="5%"> To :</td>
          <td width="15%" class="Label3">${to}</td> 
          <td width="1%"> &nbsp; </td>
      </tr>
      </table>
    </td>
  </tr>



  <tr align='left' valign='bottom' class="TableHeaderBG">
        <td class="TableHeader" width="1%">&nbsp; </td>
        <td class="TableHeader" width="5%"> S.No. </td>
        <td class="TableHeader" width="1%">&nbsp; </td>
        <td class="TableHeader" width="5%"> Compound </td>
		<td class="TableHeader" width="1%">&nbsp; </td>
        <td class="TableHeader" width="15%"> Key </td>
        <td class="TableHeader" width="1%">&nbsp; </td>
		<td class="TableHeader" width="70%"> Translation </td>
		<td class="TableHeader" width="1%">&nbsp;</td>
	</tr>


  <%

    int liCnt=0;
    String lStrClass = "";
    for(Map map : transform)
    {
      Compound compound = map.compound
      if( liCnt++ % 2 == 0 )
         lStrClass="TableRowBG2";
    else
         lStrClass = "TableRowBG1";


      %>
      <tr class='<%=lStrClass%>'>
  <td class="Label3" width="1%">&nbsp;</td>
  <td class="Label3" width="1%">${liCnt}</td>
  <td class="Label3" width="1%">&nbsp;</td>  
  <td class="Label3"><g:link action="show" controller="compound" params="[id:compound.id,from:from,to:to]"> ${compound.id}</g:link> </td>
  <td class="Label3" width="1%">&nbsp;</td>
  <td class="Label3">${compound.inchiHashKey.completeKey}</td>
  <td class="Label3" width="1%">&nbsp;</td>
  <td class="Label3">${map.result}</td>
  <td class="Label3" width="1%">&nbsp;</td>
     </tr>
      <%
    }
  %>
</table>



<gui:dataTable
    id="dt_2"
    draggableColumns="true"
    columnDefs="[
        [key:'id', sortable:true, resizeable: true, label:'Compound'],
        [key:'key', sortable:true, resizeable: true, label:'Key'],
        [key:'translation', sortable:true, resizeable: true, label: 'Translation'],
    ]"
    paginatorConfig="[
        template:'{PreviousPageLink} {PageLinks} {NextPageLink} {CurrentPageReport}',
        pageReportTemplate:'{totalRecords} total records'
    ]"
    controller="transform" action="nonStandardDataTableDataAsJSON"
    resultsList="myResults"
    rowExpansion="true"
    rowsPerPage="3"
/>





</body>
</html>